/*
* Tree header file
* created by psych0der on 12:46 am 11th feb 2012
* (c) psych0der all rights reserved

*/

#include <iostream>
#include <string>
#include <iomanip>
#include "Tree.h"


using namespace std;
int main()
{
	
	
	Tree<int> t1;
	int i=0;
	int x;
	while(i<8)
	{
		
		cout<<"\n pls enter the no to be inserted... \n";
		cin>>x;
		t1.insertNode(x);
		i++;
		
		
	}
	cout<<"\n";
	cout<<"\n inorder raversal of the tree is as follows \n";
	t1.inOrderTraversal();
	cout<<"\nenter value of node to be deleted\n";
	cin>>x;
	int flag;
	flag = t1.delNode(x);
	
	if(flag==1)
	{
		cout<<"\nnode with value "<<x<<" has been deleted \n";
	}
	else if(flag==-1)
	{
		cout<<" \n there was some error deleting the node....\n";
	}
		t1.inOrderTraversal();
	
	
	return 0;
	
	
	
	
	
	
}